import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * Write a description of class Boton here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Boton extends Actor
{
    private int tipo;
    /**
     * Act - do whatever the Boton wants to do. This method is called whenever
     * the 'Act' or 'Run' button gets pressed in the environment.
     */
    
    public Boton(int ti){
        tipo=ti;
         if(tipo==1){
           setImage("play1.png");
        }
        if(tipo==2){
          setImage("help1.png");
        }
    }
    public void act() 
    { 
        if(tipo==1){
         setImage("play1.png");
         if(Greenfoot.mouseClicked(this)){
            setImage("play2.png");
            World aux=getWorld();
            ((Menu)aux).stopMusic();
            Ciudad nueva=new Ciudad();
            Greenfoot.setWorld(nueva);
            }
        }
        if(tipo==2){
          
        
        }
       
    }    
}
